<?
//引入所有子系统信息
include_once("../../../common/model/extender_import.php");




$limit_day=date("Y-m-d",strtotime("-7 day"));

//查询最近10日加入的用户
$member_new=select_lines_all_items($table_prefix."member","createtime desc",
                                       "createtime > '$limit_day'",
                                       "");




$member_order_number_sql="select count(DISTINCT user_id) from athlon_order_info where pay_status = '1' and (status !='已删除' or status is null) ";
$member_order_number= mysqli_fetch_array(do_query($member_order_number_sql))[0];



//$config=select_one_line_all_items($table_Prefix."event_plate","nid = 1 ");

$school_list=select_lines_all_items($table_prefix."department","nid desc","parent_id = 0","");


foreach ($school_list as $k => $v) {
    $finance[$k]        = select_lines_all_items($table_prefix . "order_info", "order_id desc", "(status != '已删除' or status is null) and pay_status = 1 and student_info like '%{$v['name']}%'", "");
    $refund[$k]         = select_lines_all_items($table_prefix . "order_info", "order_id desc", "(status != '已删除' or status is null) and pay_status = 2 and student_info like '%{$v['name']}%'", "");
    $finance_1month[$k] = select_lines_all_items($table_prefix . "order_info", "order_id desc",
        "(status != '已删除' or status is null) and pay_status = 1 and student_info like '%{$v['name']}%' and add_date like '%" . date('Y-m') . "%' ", "");

}




?>








